package org.kalai.unifypay.pay;

import java.util.Map;

import org.apache.log4j.Logger;
import org.kalai.unifypay.tfb.pay.TFBPay;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class Biz1015 implements Biz {

   private static final Logger logger = Logger.getLogger(Biz1015.class);

   @Override
   public Map<String, Object> pay(String tranxSN, long cent, String subject, String notifyUrl, String merchantCode, String bizData) {
      JSONObject jo = JSON.parseObject(bizData);
      if (jo == null)
         throw new RuntimeException("#211-bizData不能为空");
      String returnUrl = jo.getString("returnUrl");// 支付成功跳转URL
      return TFBPay.aliPayPayment(tranxSN, cent, "WX_GZH", subject, "800207",returnUrl);
   }

   @Override
   public void afterPay(String tranxSN, String respCode, String respDesc, String transAmt) {
   }
}
